package ItemSystem;

import java.util.ArrayList;
/**
 * This class handles a set of items
 * @author John
 *
 */
public class ItemManager
{
	private ArrayList <Item> items  = new ArrayList<Item>();
	
	
	public Item takeItem(int index)
	{
		Item selectedItem = items.get(index);
		items.remove(index);
		
		return selectedItem;
	}
	
	
	public void addItem(Item item, int index)
	{
		items.add(index, item);
		item.pickUp();
	}
	
	public void addItem(Item item)
	{
		items.add(item);
		item.pickUp();
	}
}
